package com.lcw.lostandfound.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lcw.lostandfound.pojo.Goods;
import org.springframework.stereotype.Service;

import java.util.List;

public interface GoodsService {
    int delete(Integer id);

    int insert(Goods goods);

    int update(Goods goods);

    List<Goods> findAllGoods();

    Goods findById(Integer id);

    //搜索功能
    PageInfo<Goods> findByLike(Integer pageNum,Integer pageSize,String search);
    //发布信息
    Integer release(Goods goods);
    //浏览次数
    int updateViews(Integer id);

    List<Goods> findByUserId(Integer userId);

    //启事列表
     PageInfo<Goods> listFindMsg(Integer pageNum,Integer pageSize,Integer type);
    //首页展示
    PageInfo<Goods> listWallsFindMsg();
    PageInfo<Goods> listWallsLostMsg();
    //后台展示
    PageInfo<Goods> listGoods(Integer pageNum,Integer pageSize);
}
